home *** CD-ROM | disk | FTP | other *** search
-
-
- ReqAsk V1.2 User manual ReqAsk V1.2
-
-
- NAME
- ReqAsk
-
- SYNOPSIS
- ReqAsk [BODYFMT/A] Bodytext [[GADFMT] Gadgettext] [[TITLE]
- Titlestring] [[VAR] Variablename ] [GLOBAL]
-
- DESCRIPTION
- NOTE: This program requires OS 2.04+ to run!
-
- ReqAsk is a replacement for Commodores Ask command. The major
- difference between ReqAsk and Ask is that ReqAsk opens a
- requester. It also allows more than two different answers, and
- they can be whatever you like. The requester is the normal one
- used by e.g. Workbench. The program is fully re-entrant and can
- be made resident. Beware of environment variable name
- collissions if you use the GLOBAL switch.
-
- OPTIONS
- You must supply a bodytext. The other arguments have default
- values. The keywords (see below) is only required if you do not
- enter the strings in the ordering as above. Strings only need
- to be quoted if they contain spaces.
-
- BODYFMT
- This is a string containing the text that should be shown
- in the requester. This argument must be present. If you
- want a linefeed in the text, enter "*n" which will be
- transformed to a normal LF char. An empty string like ""
- isn't accpeted by ReqAsk.
-
- GADGETFMT
- This argument specifies what gadgets you want in the
- requester. To specify more that one gadget, separate the
- gadgets with a vertical bar ("|"). E.g. "Ok|Cancel" gives
- two gadgets, leftmost called "Ok", while the rightmost is
- called "Cancel".
-
- The returned value (see below on how to obtain it) is as
- follows: The rightmost gadget has a return value of zero.
- This should be a negative response (such as cancel). The
- other gadgets (if any), will be numbered - from left to
- right - with increasing number, starting with 1. Thus, if
- you have a gadget format like: "Yes|Maybe|No|Just kiddin!",
- clicking "Yes" will return 1, "Maybe" returns 2, "No"
- returns 3 and finally "Just kiddin!" returns 0.
-
- Default is two gadgets named "Yes" and "No" ("Yes|No").
-
- NOTE: If you have more than 10 gadgets, the return value
- when a gadget with ordinal number (as "calculated" above)
- larger than 10 is selected, will be "strange" (such as ';',
-
-
- Page 1
-
-
- ReqAsk V1.2 User manual ReqAsk V1.2
-
-
- '<'...) But it isn't that easy to fit in 10 gadgets in a
- normal requester, so... ;)
-
- TITLE
- This optional string specifies the title in the requester
- window. It defaults to "System Request" if none is
- specified.
-
- VAR
- This string lets you specify in which local variable the
- result will be stored (as a numeric string). The default
- name is "ReqAskResult".
-
- GLOBAL
- By default, ReqAsk will place the answer in a local
- environment variable. But this has one drawback: You can't
- access the result easily from ARexx. If you have set this
- flag, it will be quite easy. Simply peek in the ENV:
- directory. :)
-
- EXAMPLE
- ReqAsk "Do you like this program?"
- If $GetAskResult EQ 0
- Echo "Why not??"
- Else
- Echo "I thought you would! :)"
- EndIf
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 2
-
-